package com.zhijiang.hospital.controller;

import com.zhijiang.hospital.service.RoleService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * fan
 */
@RestController
@RequestMapping("role")
@Api(value = "角色", tags = {"角色"})
//@PreAuthorize("@Ss.hasAuthority('system:dept:admin')")
public class RoleContorller {

    @Autowired
    RoleService reloService;

//    @PostMapping("/addRole")
////    @PreAuthorize("@ss.hasAuthority()")
//    @ApiModelProperty(value = "角色添加")
//    public ResponseResult add(@RequestBody SysRole sysRole, HttpServletRequest request){
//
//        return reloService.add(sysRole,request);
//    }
//
//    @GetMapping("selectAll")
////    @PreAuthorize("hasAnyAuthority('system:dept:test')")
//    @ApiModelProperty(value = "查询所有角色")
//    public ResponseResult selectAllRole(){
//        return reloService.allRole();
//    }
//
//    @PostMapping("delete")
//    @ApiModelProperty(value = "删除某个角色")
//    public ResponseResult delete(@RequestBody SysRole sysRole){
//        return reloService.delete(sysRole);
//    }
//
//    //停用
//    @PostMapping("stop")
//    @ApiModelProperty(value = "停用某个角色")
//    public ResponseResult stop(@RequestBody SysRole sysRole){
//        return reloService.stop(sysRole);
//    }
//
//    //todo 添加
//    @PostMapping("serve")
//    @ApiModelProperty(value = "给某个员工添加角色")
//    public ResponseResult serve(@RequestBody RoleDto roleDto){
//
//        return reloService.relevancy(roleDto);
//    }
//
//    @PostMapping("relieve")
//    @ApiModelProperty(value = "解除角色用户关联")
//    public ResponseResult  relieve(@RequestBody RoleDto roleDto){
//
//        return reloService.reliveRole(roleDto);
//    }
}
